import com from './addon/com'

var components = com([
	'HeaderLayout',
	'HeaderDock',
	'LayoutMain',
	'LayoutBox',
	'TabsVertical',
	'TabsItemVertical',
	'Icon',
	'GridRow',
	'Btn'
])

//1
new Vue({
	el: '#app',
	components: components,
	ready: function(){
		 this.user = USERINFO;
		 var _this = this;
		 SCHOOLS.forEach(function(item){
			 if(item.id == USERINFO.school){
				 _this.user.schoolName = item.name
			 }
		 })
		 GRADES.forEach(function(item){
			 if(item.id == USERINFO.grade){
				 _this.user.gradeName = item.name
			 }
		 })
		 CLASSES.forEach(function(item){
			 if(item.id == USERINFO.class){
				 _this.user.className = item.name
			 }
		 })
	},
	data (){
		return {
			data: [],
			user: {}
		}
	},
	methods: {
		logout: function(){
			 
			window.location.href  = SITE_URL + '/passport/logout';
		}
	}
})
